package com.example.smallandroidcodetester;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import de.greenrobot.event.EventBus;

public class EventBusExample extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.eventbus_example);

		Button sendData = (Button) findViewById(R.id.SendEventBusData);
		sendData.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				Alma alma = new Alma();
				EventBus.getDefault().postSticky(alma);
				startActivity(new Intent(EventBusExample.this, EventBusExample2.class));
				finish();
			}
		});

	}
}
